package com.hzy.fivepalace.db.dao.ex;


import com.hzy.fivepalace.db.vo.SelectEntityVo;
import com.hzy.fivepalace.db.vo.admin.AdminHomeModuleChildVo;
import com.hzy.fivepalace.db.vo.admin.AdminHomeModuleParentVo;
import org.springframework.data.repository.query.Param;


import java.util.List;

/**
 * 通用DAO层接口
 */
public interface CommonMapperEx {

    /**
     * 用户下拉选列表
     * @param phone
     * @return
     */
    public List<SelectEntityVo> selectEntity(@Param("phone")String phone);


    /**
     * 首页模块列表-父级
     * @return
     */
    List<AdminHomeModuleParentVo> getHomeModuleParentList(@Param("content")String content);


    /**
     * 首页模块列表-子级
     * @return
     */
    List<AdminHomeModuleChildVo> getHomeModuleChildList(@Param("content")String content, @Param("indexId")Integer  indexId);

    /**
     * 根据规格id判断是否有子规格
     * @param specificationId
     * @return
     */
    boolean isHaveChildSpecification(@Param("specificationId")Integer specificationId);

    /**
     * 根据省份id和市id判断是否可以发货
     * @param provinceId
     * @param cityId
     * @return
     */
     boolean isDeliveryByProvinceIdAndCityId(@Param("provinceId")Integer provinceId,@Param("cityId")Integer cityId);


}
